If there is an error condition, the following occurs:
o The routine returns an integer value indicating the type of
error.
o The condition variable is not initialized.
o The contents of condition variable cond are undefined.
The possible return values are as follows:
Return Description
0 Successful completion.
[EAGAIN] The system lacks the necessary resources to
initialize another condition variable, or
The system-imposed limit on the total number of
condition variables under execution by a single user
is exceeded.
[EBUSY] The implementation has detected an attempt to
reinitialize the object referenced by cond, a
previously initialized, but not yet destroyed
condition variable.
[EINVAL] The value specified by cond is not a valid condition
variable.
[ENOMEM] Insufficient memory to initialize the condition
variable.